﻿using System;
using System.Data;
using System.Data.SqlClient;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Csla;

namespace RMSM
{
    [Serializable()]
    public class LoaiVienPhiBOList : Csla.NameValueListBase<int, string>
    {
        #region Factory Methods
        private LoaiVienPhiBOList()
        {
        }

        private static LoaiVienPhiBOList _list;

        public static LoaiVienPhiBOList GetLoaiVienPhiBOList()
        {
            _list = DataPortal.Fetch<LoaiVienPhiBOList>(null);
            return _list;
        }

        public static void InvalidateCache()
        {
            _list = null;
        }
        #endregion Factory Methods
        //==========================================================================

        #region Data Access
        protected override void DataPortal_Fetch(object _spParam)
        {
            RaiseListChangedEvents = false;
            IsReadOnly = false;

            this.Add(new NameValuePair((int)LoaiVienPhi.CLS_CT, "CT SCANNER"));
            this.Add(new NameValuePair((int)LoaiVienPhi.CLS_DienNao, "ĐIỆN NÃO"));
            this.Add(new NameValuePair((int)LoaiVienPhi.CLS_DienTim, "ĐIỆN TIM"));
            this.Add(new NameValuePair((int)LoaiVienPhi.CLS_NoiSoi, "NỘI SOI"));
            this.Add(new NameValuePair((int)LoaiVienPhi.CLS_SieuAm, "SIÊU ÂM"));
            this.Add(new NameValuePair((int)LoaiVienPhi.CLS_SieuAmDM, "SIÊU ÂM ĐỘNG MẠCH"));
            this.Add(new NameValuePair((int)LoaiVienPhi.CLS_XetNghiem, "XÉT NGHIỆM"));
            this.Add(new NameValuePair((int)LoaiVienPhi.CLS_XQuang, "X-QUANG"));
            this.Add(new NameValuePair((int)LoaiVienPhi.CLS_XQuangKTS, "X-QUANG KTS"));
            this.Add(new NameValuePair((int)LoaiVienPhi.CLS_XQuangRang, "X-QUANG RĂNG"));
            this.Add(new NameValuePair((int)LoaiVienPhi.HTHH_CPAP, "HỖ TRỢ HÔ HẤP CPAP"));
            this.Add(new NameValuePair((int)LoaiVienPhi.HTHH_HFO, "HỖ TRỢ HÔ HẤP HFO"));
            this.Add(new NameValuePair((int)LoaiVienPhi.HTHH_Oxy, "HỖ TRỢ HÔ HẤP OXY"));
            this.Add(new NameValuePair((int)LoaiVienPhi.HTHH_ThoMay, "HỖ TRỢ HÔ HẤP THỞ MÁY"));
            this.Add(new NameValuePair((int)LoaiVienPhi.KhamBenh, "KHÁM BỆNH"));
            this.Add(new NameValuePair((int)LoaiVienPhi.ThuocUong, "THUỐC"));
            this.Add(new NameValuePair((int)LoaiVienPhi.ThuThuat, "THỦ THUẬT"));
            IsReadOnly = true;
            RaiseListChangedEvents = true;
        }
        #endregion Data Access
        //==========================================================================
    }
}
